package com.fc.hkx.api;

import com.fc.hkx.common.ResponseJson;
import com.fc.hkx.thirdparty.aic.AicApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by futurecreative on 2017/9/9.
 */
@RestController
@RequestMapping("/api/aic")
public class AicController {
    @Autowired
    private AicApiService aicApiService;

    @RequestMapping("/risk")
    public ResponseJson risk() throws Exception {
        ResponseJson responseJson = new ResponseJson();
        responseJson.setObj(aicApiService.getRisk());
        return responseJson;
    }

    @RequestMapping("/fee")
    public ResponseJson fee() throws Exception {
        ResponseJson responseJson = new ResponseJson();
        responseJson.setObj(aicApiService.getFee());
        return responseJson;
    }

    @RequestMapping("/buy")
    public ResponseJson buy() throws Exception {
        ResponseJson responseJson = new ResponseJson();
        responseJson.setObj(aicApiService.buy());
        return responseJson;
    }
}
